import http from '../common/axios'
import $ from 'jquery'

export default {
    login(params) {
        let tempData = {};
        tempData.conditionJson = JSON.stringify(params);
        return http.request({
            url: '/api/users/login',
            method: 'post',
            data: $.param(tempData, true)
        })
    },
    register(params) {
        let tempData = {};
        tempData.conditionJson = JSON.stringify(params);
        return http.request({
            url: '/api/users/register',
            method: 'post',
            data: $.param(tempData, true)
        })
    },
    getUser() {
        return http.request({
            url: '/api/users/getUser',
            method: 'get'
        })
    }
}
